<?php declare(strict_types=1);
/**
 * @author      xianganyall <xianganyall@gmail.com>
 * @copyright   2023-2025 owner
 **/

namespace Srv\Libs\Plugins\MapGeo;

class Point
{
    public float $lng       = 0.0;      // 经度
    public float $lat       = 0.0;      // 纬度

    /**
     * @param float $lng
     * @param float $lat
     * __construct
     */
    public function __construct(float $lng, float $lat)
    {
        $this->lng      = $lng;
        $this->lat      = $lat;
    }

    /**
     * @param Point $point
     * @return bool
     * equals
     */
    public function equals(Point $point):bool
    {
        return $point->lng == $this->lng && $point->lat == $this->lat;
    }
}